package pl.edu.agh.transstat.statictisc;
import java.util.List;



public class Mean extends Function {

	public Mean(){
		name = "Mean";
	}
	
	@Override
	public double getValue(List<Double> values) {
		
		// obliczanie sredniej
		double mean = 0.0;
		for (Double value : values) {
			mean += value;
		}
		mean /= values.size();
		return mean;
	}

}
